package com.jenkins.test.security;

/**
 * @version V0.0.1
 * @ClassName: {@link SecurityContext}
 * @Description: SecurityContext
 * @author: Lanzhou
 * @date: 2021/5/16 16:54
 * @Copyright:2019 All rights reserved.
 * 注意：本内容仅限于本人开发与维护，禁止外泄以及用于其他的商业目
 */
public class SecurityContext {

    private static final ThreadLocal<LoginUser> HOLDER = new ThreadLocal<>();

    public static void set(LoginUser thirdAuthentication) {
        HOLDER.set(thirdAuthentication);
    }

    public static LoginUser get() {
        return HOLDER.get();
    }

    public static void clear() {
        HOLDER.remove();
    }

}